<?php

namespace app\api\model\service;

use think\Model;
class GoodsAdd extends Model
{
    // 表名
    protected $name = 'service_goods_add';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public static function getList($goods_id)
    {
        return self::where(['goods_id'=>$goods_id,'state'=>1])->field('name,price,cost_seconds')->select();
    }
}
